#include "ParticleManager.h"

ParticleManager::ParticleManager()
{
}

ParticleManager::~ParticleManager()
{
}

void ParticleManager::Update(float elapsedTime)
{
	std::list<Particle*>::iterator it;

	for(it = m_pParticles.begin(); it != m_pParticles.end(); it++)
	{
		Particle* particle(*it);

		if(particle->IsDead())
		{
			m_pDeadParticles.push_back(particle);
		}
	}

	for(it = m_pDeadParticles.begin(); it != m_pDeadParticles.end(); it++)
	{
		Particle* particle(*it);

		m_pParticles.remove(particle);
	}

	m_pDeadParticles.clear();
}

void ParticleManager::Draw()
{

}